from django.urls import re_path
from rest_framework.routers import DefaultRouter

from zwb_spit import views, views02

urlpatterns = [
    # 收藏或者取消收藏
    re_path(r'^spit/(?P<pk>\d+)/collect/$', views.SpitCollectViewSet.as_view({'put': 'update'})),
    # 点赞或者取消点赞
    re_path(r'^spit/(?P<pk>\d+)/updatethumbup/$', views.SpitUpdateThumbUpViewSet.as_view({'put': 'update'})),
]
router = DefaultRouter()
# 获取吐槽列表
router.register(r'spit', views.SpitModelViewSet)
urlpatterns += router.urls



